<?php
$dabr_psw = 'qwer';
if (!isset($_GET['to'])&&!isset($_COOKIE['dabr_access'])) {
  echo 'Unallow user ..';
  exit;
}
else {
  if (isset($_COOKIE['dabr_access'])) {
    $dabr_co = $_COOKIE['dabr_access'];
    if ($dabr_co<>md5($dabr_psw)) {
      echo 'Cookies error ..';
      setcookie('dabr_access','',time()-31536000);
      exit;
    }
  }
  else if (isset($_GET['to'])) {
    $dabr_to = $_GET['to'];
    if ($dabr_to==$dabr_psw) {
      setcookie('dabr_access',md5($dabr_to),time()+31536000);
    }
    else {
      echo 'Password error ..';
      exit;
    }
  }
}
?>